using System.Reflection;
using Autofac;
using Module = Autofac.Module;

namespace CMS.Web.AutoFacDI;

public class AutofacModuleRegister : Module {
    protected override void Load(ContainerBuilder builder) {
        base.Load(builder);
        var repository = Assembly.Load("CMS.Repository");
        var service = Assembly.Load("CMS.Service");
        builder.RegisterAssemblyTypes(repository,service).AsImplementedInterfaces();
    }
}